package com.swhysc.information.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * @Author zmq
 * @Date 2022/10/13 16:46
 * @Description 资讯数据表实体
 */
@Entity
@Table(name = "INFORMATION_DATA_TABLE_EX", indexes = {
        @Index(columnList = "DATA_SOURCE_ID"),
        @Index(columnList = "DIR_ID") })
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
@Data
public class InformationDataTableEx {
    @Id
    @GeneratedValue(generator = "jpa-uuid")
    @Column(name = "ID")
    private String id;

    //目录id
    @Column(name = "DIR_ID")
    private String dirId;

    //数据源id
    @Column(name = "DATA_SOURCE_ID")
    private String dataSourceId;

    //表中文名
    @Column(name = "CH_NAME")
    private String chName;

    //表英文名
    @Column(name = "EN_NAME")
    private String enName;

    //表内容
    @Column(name = "CONTENT",length = 4000)
    private String content;

    //采集范围
    @Column(name = "DATA_RANGE")
    private String dataRange;

    //信息来源
    @Column(name = "INFO_SOURCE")
    private String infoSource;

    //采集频率
    @Column(name = "FREQUENCY")
    private String frequency;

    //业务含义
    @Column(name = "BUSINESS",length = 4000)
    private String business;

    /*//创建人
    @Column(name = "CREATE_USER")
    private String createUser;*/

    //创建时间
    @Column(name = "CREATE_TIME")
    private Date createTime;

    /*//修改人
    @Column(name = "UPDATE_USER")
    private String updateUser;*/

    //修改时间
    @Column(name = "UPDATE_TIME")
    private Date updateTime;

    //备注
    @Column(name = "REMARK",length = 4000)
    private String remark;

    //排序号
    @Column(name = "SORT")
    private Integer sort;

    @Column(name = "PURCHAS_STATUS",length = 255)
    private String purchasStatus;

    @Transient
    private List<InformationDataColumnEx> informationDataColumnList;
}
